home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / emacs / 19.22 / lisp / meese.el < prev    next >
Lisp/Scheme  |  1993-03-16  |  856b  |  27 lines

  1. ;;; meese.el --- protect the impressionable young minds of America
  2.  
  3. ;; This is in the public domain on account of being distributed since
  4. ;; 1985 or 1986 without a copyright notice.
  5.  
  6. ;; Maintainer: FSF
  7. ;; Keywords: games
  8.  
  9. ;;; Code:
  10.  
  11. (defun protect-innocence-hook ()
  12.   (if (and (equal (file-name-nondirectory buffer-file-name) "sex.6")
  13.        (not (y-or-n-p "Are you over 18? ")))
  14.       (progn
  15.     (clear-visited-file-modtime)
  16.     (setq buffer-file-name (concat (file-name-directory buffer-file-name)
  17.                        "celibacy.1"))
  18.     (let (buffer-read-only)    ; otherwise (erase-buffer) may bomb.
  19.       (erase-buffer)
  20.       (insert-file-contents buffer-file-name t))
  21.     (rename-buffer (file-name-nondirectory buffer-file-name)))))
  22.  
  23. (or (memq 'protect-innocence-hook find-file-hooks)
  24.     (setq find-file-hooks (cons 'protect-innocence-hook find-file-hooks)))
  25.  
  26. ;;; meese.el ends here
  27.